<div id="options">
    <a href="javascript:parentAccordion.pr(1)">Exand All</a> | <a href="javascript:parentAccordion.pr(-1)">Collapse All</a>
</div>
<form action="module-referentiel-redaction.html" method="post" id="referentiel_redac">
    <ul class="acc" id="acc">
        <?php
        $i = 0;
        foreach ($dimension1 as $d1) {
            
            $i++;
            $dimension2 = $d1->getLesDimensions2();
            ?>
            <li>
                <h3><?php echo $d1->getRefD1() . " - " . $d1->getNom(); ?></h3>
                <div class="acc-section">
                    <div class="acc-content">
                        <ul class="acc" id="nested<?php echo $i;?>">
                            <?php foreach ($dimension2 as $d2) { ?>
                                <li>
                                    <h3><?php echo htmlentities($d2->getTitre()); ?></h3>
                                    <div class="acc-section">
                                        <div class="acc-content">
                                            <?php echo htmlentities($d2->getDescr()); ?>
                                            <br/><br/><br/>
                                            <h4>Niveaux</h4>
                                            <?php foreach ($d2->getLesDimensions3() as $d3) {
                                                ?>
                                                <div class="niveaux">
                                                    <?php if (isset($_SESSION['role']) && $_SESSION['role'] != "Public") { ?>
                                                        <input type="checkbox" name="options[]" value="<?php echo urlencode(serialize($d3)); ?>"/>
                                                    <?php } ?>
                                                    <div class="numero"><?php echo $d3->getNiveau() . "-" ?></div> <?php echo htmlentities($d3->getDescr()); ?>
                                                </div>
                                                <br/>
                                            <?php } ?>
                                            <h4>Connaissances</h4>
                                            <?php foreach ($d2->getLesDimensions4() as $d4) {
                                                if ($d4->getType()->getLettre() == "K") { ?>
                                                    <div class="niveaux">
                                                        <?php if (isset($_SESSION['role']) && $_SESSION['role'] != "Public") { ?>
                                                            <input type="checkbox" name="options[]" value="<?php echo urlencode(serialize($d4)); ?>"/>
                                                        <?php } ?>
                                                        <div class="numero"><?php echo trim($d4->getType()->getLettre()) . "" . $d4->getChiffre() ?></div> <?php echo htmlentities($d4->getDescr()); ?>
                                                    </div>
                                                    <br/>
                                                <?php } ?>

                                            <?php } ?>
                                            <h4>Savoir-faire</h4>
                                            <?php foreach ($d2->getLesDimensions4() as $d4) {
                                                if ($d4->getType()->getLettre() == "S") { ?>
                                                    <div class="niveaux">
                                                        <?php if (isset($_SESSION['role']) && $_SESSION['role'] != "Public") { ?>
                                                            <input type="checkbox" name="options[]" value="<?php echo urlencode(serialize($d4)); ?>"/>
                                                        <?php } ?>
                                                        <div class="numero"><?php echo trim($d4->getType()->getLettre()) . "" . $d4->getChiffre() ?></div> <?php echo htmlentities($d4->getDescr()); ?>
                                                    </div>
                                                    <br/>
                                                <?php } ?>

                                            <?php } ?>
                                        </div>
                                    </div>
                                </li>
                            <? } ?>
                        </ul>

                    </div>
                </div>
            </li>
        <?php } // fin foreach $d1  ?>

    </ul>
    <?php if (isset($_SESSION['role']) && $_SESSION['role'] != "Public") { ?>
        <input type="submit"/>
    <?php } ?>
</form>


<script type="text/javascript">
    
    var parentAccordion=new TINY.accordion.slider("parentAccordion");
    parentAccordion.init("acc","h3",0,0);

    var nestedAccordion1=new TINY.accordion.slider("nestedAccordion1");
    nestedAccordion1.init("nested1","h3",true,-1,"acc-selected");
    
    var nestedAccordion2=new TINY.accordion.slider("nestedAccordion2");
    nestedAccordion2.init("nested2","h3",true,-1,"acc-selected");
    
    var nestedAccordion3=new TINY.accordion.slider("nestedAccordion3");
    nestedAccordion3.init("nested3","h3",true,-1,"acc-selected");
    
    var nestedAccordion4=new TINY.accordion.slider("nestedAccordion4");
    nestedAccordion4.init("nested4","h3",true,-1,"acc-selected");
    
    var nestedAccordion5=new TINY.accordion.slider("nestedAccordion5");
    nestedAccordion5.init("nested5","h3",true,-1,"acc-selected");
    
    
    

</script>